{% load static %}
<link rel="stylesheet" href="{% static 'adminpage.css' %}">

<head>
  <title>MMS Test</title>
    <link rel="icon" type="image/x-icon" href="/static/11.png">
</head>


<h1><a href="http://127.0.0.1:8000/members/login" style="color: white;">MMS(Mail-Management-System)</a></h1>
<br></br>

<div id="block0">
<nav style="float: right; width: 40%;"> <!-- The nav link semantically marks your main site navigation -->
    <ul style=" float:none;">
        <li style="float: left;list-style: none;padding: 4px 8px;"><a href="#block1" style="color:antiquewhite;">用户</a></li>
        <li style="float: left;list-style: none;padding: 4px 8px;"><a href="#block2" style="color:antiquewhite;">通讯录</a></li>
        <li style="float: left;list-style: none;padding: 4px 8px;"><a href="#block3" style="color:antiquewhite;">草稿</a></li>
        <li style="float: left;list-style: none;padding: 4px 8px;"><a href="#block4" style="color:antiquewhite;">邮件</a></li>
        <li style="float: left;list-style: none;padding: 4px 8px;"><a href="#block5" style="color:antiquewhite;">记事本</a></li>
        <li style="float: left;list-style: none;padding: 4px 8px;"><a href="#block6" style="color:antiquewhite;">附件</a></li>
    </ul>
</nav>
    
    
</div>
<br></br>
<br></br>
<h2 style="color: white; margin-bottom:2ch; text-align: center;">用户信息</h2>
<div class="tb" id="block1">
    <table class="rwd-table">
    <tr>
        <th>id</th>
        <th>name</th>
        <th>passwd</th>
        <th>sex</th>
      </tr>
{% for x in users %}
<tr>
<td>{{ x.user_id }}</td>
<td>{{ x.user_name }}</td>
<td>{{ x.passwd }}</td>
<td>{{ x.user_sex }}</td>
    
<td><a href="delete/{{x.user_id}}">delete</a></td>
<td><a href="http://localhost:8000/members/update/{{x.user_id}}">update</a></td>

</tr>
{% endfor %}
<tr><td><a href="http://localhost:8000/members/add/" style="color:antiquewhite;">add a new user</a></td></tr>
</table>

</div>


<br></br>
<h2 style="color: white; margin-bottom:2ch; text-align: center;">通讯录信息</h2>
<div class="tb" id="block2">
<table class="rwd-table">
    <tr>
        <th>联系人ID</th>
        <th>持有者ID</th>
        <th>备注</th>
      </tr>
{% for x in contacts %}
<tr>
<td>{{ x.contact_id }}</td>
<td>{{ x.owner_id }}</td>
<td>{{ x.remark }}</td>
</tr>
{% endfor %}
</table>
</div>



<br></br>
<h2 style="color: white; margin-bottom:2ch; text-align: center;">草稿信息</h2>
<div class="tb" id="block3">
    <table class="rwd-table">
        <tr>
            <th>草稿ID</th>
            <th>草稿内容</th>
            <th>草稿主题</th>
            <th>发送者ID</th>
            <th>接受者ID</th>
            <th>最后编辑时间</th>
          </tr>
    {% for x in drafts %}
    <tr>
    <td>{{ x.draft_id }}</td>
    <td>{{ x.draft_content }}</td>
    <td>{{ x.draft_theme }}</td>
    <td>{{x.receiver_id}}</td>
    <td>{{x.sender_id}}</td>
    <td>{{x.last_edit_time}}</td>
    </tr>
    {% endfor %}
    </table>
    </div>

<br></br>

<h2 style="color: white; margin-bottom:2ch; text-align: center;">邮件信息</h2>
<div class="tb" id="block4">
    <table class="rwd-table">
        <tr>
            <th>邮件ID</th>
            <th>邮件主题</th>
            <th>邮件内容</th>
            <th>发送人ID</th>
            <th>接收人ID</th>
            <th>发送时间</th>
            <th>附件ID</th>
          </tr>
    {% for x in emails %}
    <tr>
    <td>{{ x.email_id }}</td>
    <td>{{ x.email_theme}}</td>
    <td>{{ x.email_content }}</td>
    <td>{{x.sender_id}}</td>
    <td>{{x.receiver_id}}</td>
    <td>{{x.sent_time}}</td>
    <td>{{x.appendix_id}}</td>
    </tr>
    {% endfor %}
    </table>
    </div>

<br></br>

<h2 style="color: white; margin-bottom:2ch; text-align: center;">记事本信息</h2>
<div class="tb" id="block5">
    <table class="rwd-table">
        <tr>
            <th>记事本ID</th>
            <th>记事本主题</th>
            <th>记事本内容</th>
            <th>编辑时间</th>
            <th>主人ID</th>
          </tr>
    {% for x in notebooks %}
    <tr>
    <td>{{ x.notebook_id }}</td>
    <td>{{ x.book_theme}}</td>
    <td>{{ x.book_content }}</td>
    <td>{{ x.edit_time}}</td>
    <td>{{ x.owner_id}}</td>
    </tr>
    {% endfor %}
    </table>
</div>

<br></br>

<h2 style="color: white; margin-bottom:2ch; text-align: center;">附件信息</h2>
<div class="tb" id="block6">
    <table class="rwd-table">
        <tr>
            <th>附件ID</th>
            <th>附件名字</th>
            <th>附件URL</th>
          </tr>
    {% for x in appendixs %}
    <tr>
    <td>{{ x.appendix_id }}</td>
    <td>{{ x.appendix_name}}</td>
    <td>{{ x.appendix_url }}</td>

    </tr>
    {% endfor %}
    </table>
</div>